/* --- START OF FILE card-style.css --- */

/* --- Dark Mode Card Styling --- */
/* Styles for the individual content item cards */
.content-item {
    /* Note: flex-shrink, width, aspect-ratio, scroll-snap-align remain in home-style.css */
    /* as they relate more to layout within the carousel container */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #1e1e1e; /* Fallback background */
    display: flex; /* Keep flex for overlay positioning */
    flex-direction: column;
    justify-content: flex-end;
    color: #e0e0e0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.content-item:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

.content-item::before { /* Gradient Overlay */
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 35%, rgba(0, 0, 0, 0.1) 65%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.content-item:hover::before {
    opacity: 0.1; /* Fade out gradient on hover */
}

.content-overlay { /* Text/Buttons container */
    position: relative;
    z-index: 2;
    padding: 15px; /* Slightly smaller padding for smaller cards */
    width: 65%; /* Adjust width if needed */
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.content-info h3 { /* Title */
    margin: 0 0 5px 0;
    width: 90%; /* Prevent text spilling out of the gradient area */
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    line-clamp: 4; /* Limit to 4 lines */
    -webkit-line-clamp: 4; /* Adjust line clamp if needed */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Allow wrapping */
    transition: opacity 0.3s ease;
}

/* Hide title on hover to reveal more background */
.content-item:hover .content-info h3 {
    opacity: 0;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px; /* Provides space between badges */
    margin-bottom: 5px;
}

.content-info .type-badge { /* Type (Movie/Series) */
    font-size: 0.8em;
    background-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    /* Removed margin-top, display, and align-self as the new .badges-container handles layout */
}

.subbed-badge {
    font-size: 0.8em;
    background-color: rgba(66, 165, 245, 0.4); /* A pleasant blue to distinguish from the type badge */
    color: #e0e0e0;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Buttons area */
.content-actions {
    padding: 0; /* Reset padding if any inherited */
    border-top: none; /* Reset border if any inherited */
    text-align: left; /* Align buttons left */
    margin-top: auto; /* Push buttons to the bottom */
}

.content-actions a { /* Buttons */
    text-decoration: none;
    padding: 8px 14px;
    margin-right: 8px;
    margin-bottom: 5px; /* Space if buttons wrap */
    display: inline-block;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.details-button {
    background-color: rgba(70, 70, 70, 0.8);
    color: #e0e0e0;
}
.details-button:hover {
    background-color: rgba(90, 90, 90, 0.9);
}
.watch-button {
    background-color: rgba(0, 90, 210, 0.85);
    color: #e0e0e0;
}
.watch-button:hover {
    background-color: rgba(0, 110, 230, 0.9);
}

/* --- Placeholder / Error Card Styling --- */
/* Inherits .content-item dimensions from home-style.css */
.content-placeholder {
    /* Override or add styles for placeholder appearance */
    border: 1px dashed orange;
    color: orange;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9em;
    background: #2a2a2a; /* Dark background for placeholder */
    /* Reset potential inherited styles that don't make sense here */
    background-image: none !important;
}
.content-placeholder::before {
    display: none; /* Hide gradient overlay */
}

.error-card-creation.content-placeholder {
     border-color: red;
     color: red;
     background: #3a2a2a; /* Slightly reddish dark background */
 }


/* --- END OF FILE card-style.css --- */